home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / SpinLock-fake.cc,v < prev    next >
Text File  |  1989-02-20  |  1KB  |  106 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.37.40;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.49.19;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.10.30.13.04.40;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.09.28.22.13.23;  author grunwald;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 3.2
  35. log
  36. @Start using Gnu library heaps for schedulers
  37. @
  38. text
  39. @// This may look like C code, but it is really -*- C++ -*-
  40. // 
  41. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  42. //
  43. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  44. //
  45. #include "SpinLock.h"
  46. #include "SpinFetchAndOp.h"
  47.  
  48. #ifdef USE_SHARED_MEMORY
  49. void
  50. SpinLock::reserve()
  51. {
  52.     assert(state == SpinLockFree);
  53.     state = ~SpinLockFree;
  54. }
  55.  
  56. int
  57. SpinFetchAndOp::add(int d)
  58. {
  59.     int was = data;
  60.     data += d;
  61.     return(was);
  62. }
  63.  
  64. #endif
  65. @
  66.  
  67.  
  68. 3.1
  69. log
  70. @Steay version
  71. @
  72. text
  73. @@
  74.  
  75.  
  76. 1.2
  77. log
  78. @*** empty log message ***
  79. @
  80. text
  81. @d10 1
  82. d25 2
  83. @
  84.  
  85.  
  86. 1.1
  87. log
  88. @Initial revision
  89. @
  90. text
  91. @d1 8
  92. a8 2
  93. #include "HardSpinLock.h"
  94. #include "HardFetchAndOp.h"
  95. d11 1
  96. a11 1
  97. HardSpinLock::reserve()
  98. d13 2
  99. a14 2
  100.     assert(state == HardSpinLockFree);
  101.     state = ~HardSpinLockFree;
  102. d18 1
  103. a18 1
  104. HardFetchAndOp::add(int d)
  105. @
  106.